<template>
    <div class="on-siteInspection-div-2"  :key="onSiteInspectionKey">
        <div style="width: 60%;margin: 5px auto 10px auto;" v-if="!currentRow.isTopTabs && currentRow.isZZState">
            <a-steps :current="currentSteps" size="small" >
                <a-step title="首次会议" >
                    <div slot="icon" class="steps-item-icon-box">1</div>
                </a-step>
                <a-step title="技术审评笔记">
                    <div slot="icon" class="steps-item-icon-box">2</div>
                </a-step>
                <a-step title="审评报告制作">
                    <div slot="icon" class="steps-item-icon-box">3</div>
                </a-step>
                <a-step title="末次会议">
                    <div slot="icon" class="steps-item-icon-box">4</div>
                </a-step>
            </a-steps>
        </div>
        <div class="process-handling-card" v-if="!currentRow.isTopTabs && currentSteps == 2">
            <a-tabs type="card" v-model:activeKey="activeKey" @change="tabPaneChange">
                <!-- <a-tab-pane key="会议签到" tab="会议签到"></a-tab-pane> -->
                <!-- <a-tab-pane key="审评方案拟定" tab="审评方案拟定"></a-tab-pane> -->
                <a-tab-pane v-if="currentRow.isZZState" key="审评情况专述" tab="审评情况专述"></a-tab-pane>
                <a-tab-pane key="审评总体情况" tab="审评总体情况"></a-tab-pane>
                <a-tab-pane v-if="currentRow.isZZState" key="审评结论及其他说明" tab="审评结论及其他说明"></a-tab-pane>
                <a-tab-pane v-if="currentRow.isZZState" key="审评报告" tab="审评报告制作"></a-tab-pane>
                <a-tab-pane v-if="currentRow.isZZState" key="缺陷报告" tab="缺陷报告制作"></a-tab-pane>
                <!-- <a-tab-pane v-if="currentRow.isZZState" key="技术审评材料汇总" tab="技术审评材料汇总"></a-tab-pane> -->
                <!-- <a-tab-pane v-if="currentRow.isZZState" key="材料审查" tab="材料审查"></a-tab-pane> -->
                <!-- <a-tab-pane key="申请信息" tab="事项信息"></a-tab-pane> -->
                <!-- <a-tab-pane key="环节流转记录" tab="流转记录"></a-tab-pane> -->
            </a-tabs>
        </div>
        <div
         class="on-siteInspection-content" 
         :style="{height: currentRow.isTopTabs?'calc(100vh - '+168+'px)':(currentSteps == 2?'calc(100vh - '+193+'px)':'calc(100vh - '+161+'px)'),border:currentRow.isTopTabs?'none': '1px solid #38f',borderTop: currentSteps == 2?'0 !important':'1px solid #38f !important'}">
            <div v-show="activeKey == '审评情况专述'&&currentSteps == 2" style="padding: 5px;">
                <div>
                    <a-button style="margin-right: 15px;" class="blue-btn" type="primary" @click="selectDescribe()" icon="check-circle">选择描述模板</a-button>
                    <a-button style="margin-right: 15px;" class="blue-btn" type="primary" @click="saveData('fjcqkzs',currentRow.fjcqkzs)" icon="folder">保存</a-button>
                    <a-button style="margin-right: 15px;" class="blue-btn" type="primary" @click="addDescribe()" icon="folder">保存为描述模板</a-button>
                </div>
                <div style="margin-top: 10px;">
                    <a-textarea 
                        v-model:value="currentRow.fjcqkzs"
                        placeholder="请输入审评情况专述"
                        :autosize="{ minRows: 17, maxRows: 10000 }"
                    ></a-textarea>
                </div>
                <a-drawer
                    title="描述模板"
                    placement="right"
                    :closable="true"
                    :visible="drawerVisible"
                    @close="drawerVisible = false"
                    width="50%"
                >
                    <div :key="drawerKey">
                        <a-radio-group name="radioGroup" v-model:value="fmbly" @change="fmblyChange" style="margin-bottom: 10px;">
                            <a-radio value="个人">个人</a-radio>
                            <a-radio value="审评中心">审评中心</a-radio>
                            <a-radio value="其他审评员">其他审评员</a-radio>
                        </a-radio-group>
                        <div>
                            <a-input-search
                                :key="inputSearchKey"
                                placeholder="请输入内容"
                                enter-button="搜索"
                                @search="onSearchDescribe"
                            />
                        </div>
                        <div style="height: calc(100vh - 200px);overflow-y: auto;">
                            <a-list :data-source="describeList" :loading="describeLoading">
                                <a-list-item slot="renderItem" slot-scope="item, index" :key="index">
                                    <div style="width: 300px;" @click="selelctDescribeText(item.fmbnr)">{{ item.fmbnr }}</div>
                                    <span>{{ item.fdycs }}
                                        <span v-if="index !== 0">次</span>
                                    </span>
                                    <div slot="actions" v-if="fmbly == '个人'">
                                        <a-button v-if="index !== 0" size="small" class="red-btn" type="primary" @click="deleteDescribe(item)" icon="delete">删除</a-button>
                                        <span v-else style="width: 48px;display: inline-block;text-align: center;">操作</span>
                                    </div>
                                </a-list-item>
                            </a-list>
                        </div>
                        <a-pagination
                        v-if="totalDescribe"
                        :key="paginationKey"
                        show-size-changer
                        v-model="paginationDescribe.pageNo" 
                        :default-current="paginationDescribe.pageNo"
                        :total="totalDescribe" 
                        :page-size="paginationDescribe.pageSize"
                        @change="paginationChange"
                        @showSizeChange="paginationChange" />
                    </div>
                </a-drawer>
            </div>
            <div v-show="activeKey == '审评总体情况'&&currentSteps == 2">
                <div style="display: flex;align-items: center;justify-content: space-between;margin: 5px 15px;">
                    <div style="font-weight: 600;font-size: 16px;" :key="overallKey">
                        <span style="padding-right: 30px;">
                            合计：
                            <span style="color: #2F54EB;padding-right:5px;font-size: 20px;">{{ overallNum.hjSize }}</span>
                            <span>章节</span>
                        </span>
                        <span style="padding-right: 30px;">
                            完成审评：
                            <span style="color: #05e659;padding-right:5px;font-size: 20px;">{{ overallNum.wcSize }}</span>
                        </span>
                        <span style="padding-right: 30px;">
                            未完成：
                            <span style="color: #f00707;padding-right:5px;font-size: 20px;">{{ overallNum.wwcSize }}</span>
                        </span>
                    </div>
                    <div v-if="currentRow.isZZState">
                        <a-button class="blue-btn" type="primary" @click="activeKey='审评结论及其他说明'" icon="arrow-right">下一步</a-button>
                    </div>
                    
                </div>
                <div style="display: flex;border: 1px solid #d9d9d9;margin: 0 15px;">
                    <div style="width: 25%;border-right: 1px solid #d9d9d9;padding: 5px;height: calc(100vh - 297px);overflow-y: auto;">
                        <div
                        v-for="(item,index) in chapterList" 
                        :key="index" 
                        style="display: flex;align-items: center;padding: 5px;"
                        :style="{
                            borderBottom:index+1 !== chapterList.length ?'1px solid #e6f7ff':'',
                            backgroundColor:index == chapterRow.index?'#e6f7ff':'',
                            color:index == chapterRow.index?'#2F54EB !important':'',
                            fontWeight:index == chapterRow.index?'600':''}"
                        >
                            <span style="padding-right: 15px;flex: 1;" @click="fzjmcClick(item,index)">{{ item.fzjmc }}</span>
                            <a-select size="small" v-model:value="item.fwczt" @change="chapterStatusChange(item,index)">
                                <a-select-option value="已完成">已完成</a-select-option>
                                <a-select-option value="未完成">未完成</a-select-option>
                            </a-select>
                        </div>
                    </div>
                    <div style="flex: 1;padding: 5px 10px;">
                        <h4 style="margin: 0;font-weight: 600;font-size: 16px;">{{ chapterRow.fzjmc }}</h4>
                        <div class="process-handling-card">
                            <a-tabs type="card" v-model:activeKey="chapterActiveKey" @change="chapterTabPaneChange">
                                <a-tab-pane key="情况描述" tab="情况描述"></a-tab-pane>
                                <a-tab-pane key="发现问题" tab="发现问题"></a-tab-pane>
                            </a-tabs>
                        </div>
                        
                        <div class="chapter-tabs-content">
                            <div v-if="chapterActiveKey == '发现问题'" style="display: flex;justify-content: flex-end;margin-right: 100px;">
                                <a-button style="margin-right: 15px;" class="blue-btn" type="primary" @click="problemBaseSelect()" icon="check-circle">选择历史库</a-button>
                                <a-button style="margin-right: 15px;" class="blue-btn" type="primary" @click="addproblem" icon="plus">添加问题</a-button>
                            </div>
                            <div :style="{height: chapterActiveKey == '情况描述'?'calc(100vh - 384px)':'calc(100vh - 414px)'}" style="overflow-y: auto;">
                                <div v-show="chapterActiveKey == '情况描述'">
                                    <div style="margin: 10px 0;">
                                        <a-button style="margin-right: 15px;" class="blue-btn" type="primary" @click="situationClick()" icon="check-circle">选择描述</a-button>
                                        <a-button style="margin-right: 15px;" class="blue-btn" type="primary" icon="folder" @click="savechapter('fjcms',chapterRow.fjcms,chapterRow.id,chapterRow.index)" >保存</a-button>
                                        <!-- <a-button class="blue-btn" type="primary" >保存为常用描述</a-button> -->
                                    </div>
                                    <div>
                                        <a-textarea 
                                            v-model:value="chapterRow.fjcms"
                                            placeholder="请输入情况描述"
                                            :autosize="{ minRows: 13, maxRows: 10000 }"
                                        ></a-textarea>
                                    </div>
                                    <a-drawer
                                        title="情况描述"
                                        placement="right"
                                        :closable="true"
                                        :visible="situationDescriptionVisible"
                                        @close="situationDescriptionVisible = false"
                                        width="60%"
                                    >
                                        <div :key="chapterdrawerKey">
                                            <a-radio-group name="radioGroup" v-model:value="chapterRadio"  @change="chapterRadioChange" style="margin-bottom: 10px;">
                                                <a-radio value="我写过的描述">我写过的描述</a-radio>
                                                <a-radio value="其他审评员写过的">其他审评员写过的</a-radio>
                                                <a-radio value="该企业的描述">该企业的描述</a-radio>
                                                <a-radio value="所有历史描述">所有历史描述</a-radio>
                                            </a-radio-group>
                                            
                                            <div>
                                                <!-- size="small" -->
                                                <a-input-search
                                                    :key="inputSearchKey"
                                                    placeholder="请输入描述内容"
                                                    enter-button="搜索"
                                                    @search="onSearchSituation"
                                                />
                                            </div>
                                            <div style="height: calc(100vh - 281px);overflow-y: auto;">
                                                <a-list :data-source="situationList" :loading="situationLoading">
                                                    <a-list-item slot="renderItem" slot-scope="item, index" :key="index">
                                                        <div style="width: 300px;">{{ item.fmbnr }}</div>
                                                        <span>{{ item.fdycs }}
                                                            <span v-if="index !== 0">次</span>
                                                        </span>
                                                        <div slot="actions" v-if="chapterRadio == '我写过的描述'">
                                                            <a-button v-if="index !== 0" size="small" class="blue-btn" type="primary" @click="selectSituationText('fjcms',chapterRow.fjcms,chapterRow.id,chapterRow.index,item)" >选择</a-button>
                                                            <span v-else style="width: 48px;display: inline-block;text-align: center;">操作</span>
                                                        </div>
                                                    </a-list-item>
                                                </a-list>
                                            </div>
                                            <a-pagination
                                            v-if="totalDescribe"
                                            :key="paginationKey"
                                            show-size-changer
                                            v-model="paginationDescribe.pageNo" 
                                            :default-current="paginationDescribe.pageNo"
                                            :total="totalDescribe" 
                                            :page-size="paginationDescribe.pageSize"
                                            @change="paginationChange"
                                            @showSizeChange="paginationChange" />
                                        </div>
                                    </a-drawer>
                                    <div v-if="currentRow.isZZState" style="width: 100%;display: flex;justify-content: flex-end;margin-top: 15px;">
                                        <a-button class="blue-btn" type="primary" @click="chapterActiveKey = '发现问题'" icon="arrow-right">下一步</a-button>
                                    </div>
                                </div>
                                <div v-show="chapterActiveKey == '发现问题'">
                                    <a-spin tip="正在加载中..." :spinning="chapterIssuesSpinning">
                                        <div :key="chapterIssuesKey">
                                            <div :key="chapterIssuesKey" v-if="chapterIssuesList.length">
                                                <div v-for="(item,index) in chapterIssuesList" :key="index" >
                                                    <div style="margin: 0 15px;font-size: 16px;">
                                                        <div style="display: flex;justify-content: space-between;">
                                                            <div>
                                                                <span style="background: #d9d9d9;color: #000;padding: 0 5px;">问题{{item.wt.forder}}</span>
                                                                <span >严重程度：</span>
                                                                <a-select size="small" v-model="item.wt.fyzcd" @change="severityChange(item.wt,'fyzcd')" style="width: 90px;" placeholder="请选择严重程度">
                                                                    <a-select-option value="一般缺陷">一般缺陷</a-select-option>
                                                                    <a-select-option value="主要缺陷">主要缺陷</a-select-option>
                                                                    <a-select-option value="严重缺陷">严重缺陷</a-select-option>
                                                                </a-select>
                                                            </div>
                                                            <div>
                                                                <a-button size="small" class="red-btn" type="primary" @click="deleteWTClick(item)" icon="delete">删除问题</a-button>
                                                            </div>
                                                            
                                                        </div>
                                                        <div style="border: 1px solid #d9d9d9;margin: 5px 0;">
                                                            <div style="padding:10px;">
                                                                <a-textarea 
                                                                    @blur="severityChange(item.wt,'fwtms')"
                                                                    v-model:value="item.wt.fwtms"
                                                                    placeholder="请输入问题"
                                                                    :autosize="{ minRows: 5, maxRows: 10000 }"
                                                                ></a-textarea>
                                                            </div>
                                                            <div v-for="(trem,tIndex) in item.tkList" :key="tIndex">
                                                                <div 
                                                                style="border-top: 1px solid #d9d9d9;border-bottom: 1px solid #d9d9d9;
                                                                padding: 3px 10px;display: flex;justify-content: space-between;align-items: center;"
                                                                >
                                                                <span>对应条款：
                                                                    <span style="color: #000;font-weight: 500;">{{ trem.tk }}</span>
                                                                </span>
                                                                <div>
                                                                    <a-button size="small" style="margin-right: 15px;" class="blue-btn" type="primary" @click="selectTermItem(item,trem)" >重新选择</a-button>
                                                                    <a-button size="small" class="red-btn" type="primary" @click="deleteTermItem(trem)" icon="delete">删除</a-button>
                                                                </div>
                                                                </div>
                                                            </div>
                                                            <div style="display: flex;justify-content: center;padding: 3px;">
                                                                <a-button size="small" style="margin-right: 15px;" class="blue-btn" type="primary" @click="selectTermItem(item,{})" >选择对应条款</a-button>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div style="height: 8px;background-color: #eeecec;margin: 10px 15px;border-radius: 4px;" ></div>
                                                </div>
                                            </div>
                                            <div v-else style="margin-top: 30px;">
                                                <a-empty />
                                            </div>
                                        
                                        
                                        <a-drawer
                                            title="问题历史库"
                                            placement="right"
                                            :closable="true"
                                            :visible="problemHistoryVisible"
                                            @close="problemHistoryVisible = false"
                                            width="60%"
                                        >
                                            <div :key="problemHistoryKey">
                                                <div>
                                                    <!-- size="small" -->
                                                    <a-input-search
                                                        :key="problemHistoryKey"
                                                        placeholder="请输入关键字"
                                                        enter-button="搜索"
                                                        @search="onSearchProblemHistory"
                                                    />
                                                </div>
                                                <div style="height: calc(100vh - 167px);overflow-y: auto;">
                                                    <a-list :data-source="problemHistoryList" :loading="problemHistoryLoading">
                                                        <a-list-item slot="renderItem" slot-scope="item, index" :key="index">
                                                            <div style="width: 300px;">{{ item.fwtms }}</div>
                                                            <span>{{ item.fzdyzh }}</span>
                                                            <div slot="actions">
                                                                <a-button v-if="index !== 0" size="small" class="blue-btn" type="primary" @click="SelectproblemHistory(item)">选择</a-button>
                                                                <span v-else style="width: 48px;display: inline-block;text-align: center;">操作</span>
                                                            </div>
                                                        </a-list-item>
                                                    </a-list>
                                                </div>
                                                <a-pagination
                                                v-if="totalDescribe"
                                                :key="paginationKey"
                                                show-size-changer
                                                v-model="paginationDescribe.pageNo" 
                                                :default-current="paginationDescribe.pageNo"
                                                :total="totalDescribe" 
                                                :page-size="paginationDescribe.pageSize"
                                                @change="paginationChange"
                                                @showSizeChange="paginationChange" />
                                            </div>
                                        </a-drawer>
                                        <a-drawer
                                            title="选择条款"
                                            placement="right"
                                            :closable="true"
                                            :visible="termItemVisible"
                                            @close="termItemVisible = false"
                                            width="60%"
                                        >
                                            <div :key="termItemKey">
                                                <div>
                                                    <!-- size="small" -->
                                                    <a-input-search
                                                        :key="termItemKey"
                                                        placeholder="请输入关键字"
                                                        enter-button="搜索"
                                                        @search="onSearchTermItem"
                                                    />
                                                </div>
                                                <div style="height: calc(100vh - 167px);overflow-y: auto;">
                                                    <a-list :data-source="termItemList" :loading="termItemLoading">
                                                        <a-list-item slot="renderItem" slot-scope="item, index" :key="index" :style="{backgroundColor:currentTerms.trem.ftkid == item.id?'#d9d9d9':''}">
                                                            <div style="width: 300px;">{{ item.fzdyznr }}</div>
                                                            <span>{{ item.fzdyzh }}</span>
                                                            <div slot="actions">
                                                                <!-- {{ item }}
                                                                <br/>
                                                                {{ currentTerms.trem }}
                                                                <br/> -->
                                                                <a-button v-if="index !== 0" size="small" class="blue-btn" type="primary" @click="SelectTermItemItem(item)">选择</a-button>
                                                                <span v-else style="width: 48px;display: inline-block;text-align: center;">操作</span>
                                                            </div>
                                                        </a-list-item>
                                                    </a-list>
                                                </div>
                                                <a-pagination
                                                v-if="totalDescribe"
                                                :key="paginationKey"
                                                show-size-changer
                                                v-model="paginationDescribe.pageNo" 
                                                :default-current="paginationDescribe.pageNo"
                                                :total="totalDescribe" 
                                                :page-size="paginationDescribe.pageSize"
                                                @change="paginationChange"
                                                @showSizeChange="paginationChange" />
                                            </div>
                                        </a-drawer>
                                        </div>
                                    </a-spin>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div v-show="activeKey == '审评结论及其他说明'&&currentSteps == 2">
                <div style="display: flex;justify-content: space-between;align-items: center;margin: 3px 0;">
                    <h3>审评结论：</h3>
                    <div style="margin-right: 100px;">
                        <a-button style="margin-right: 15px;" class="blue-btn" type="primary" @click="generateConclusion('fcyjl',currentRow.fcyjl)" icon="check-circle">生成结论</a-button>
                        <a-button style="margin-right: 15px;" class="blue-btn" type="primary" @click="saveData('fcyjl',currentRow.fcyjl)" icon="folder">保存</a-button>
                    </div>
                </div>
                <div>
                    <!-- v-model:value="currentRow.fcyjl" -->
                    <a-textarea 
                        v-model:value="currentRow.fcyjl"
                        placeholder="请输入审评结论"
                        :autosize="{ minRows: 8, maxRows: 10000 }"
                    ></a-textarea>
                </div>
                <div style="display: flex;justify-content: space-between;align-items: center;margin: 3px 0;margin-top: 20px;">
                    <h3>其他说明：</h3>
                    <div style="margin-right: 100px;">
                        <a-button style="margin-right: 15px;" class="blue-btn" type="primary" @click="saveData('fcyqtwt',currentRow.fcyqtwt)" icon="folder">保存</a-button>
                    </div>
                </div>
                <div>
                    <a-textarea 
                        v-model:value="currentRow.fcyqtwt"
                        placeholder="请输入其他说明"
                        :autosize="{ minRows: 8, maxRows: 10000 }"
                    ></a-textarea>
                </div>
                <div style="width: 100%;display: flex;justify-content: flex-end;margin-top: 15px;">
                    <a-button style="margin-right: 96px;" class="blue-btn" type="primary" @click="activeKey = '审评报告'" icon="arrow-right">下一步</a-button>
                </div>
            </div>
            <div v-show="activeKey == '审评报告' &&currentSteps == 2" >
                <div v-if="programData.id" :key="programKey">
                    <div>
                        <a-button
                        style="margin-right: 15px;" 
                        class="blue-btn" type="primary" 
                        @click="refreshFile" icon="reload">刷新</a-button>

                        <a-button
                        style="margin-right: 15px;" 
                        class="blue-btn" type="primary" 
                        @click="downloadFiles(programData)" icon="download">下载签字</a-button>

                        <a-button
                        v-if="programData.fwjlx == '.pdf'"
                        style="margin-right: 15px;" 
                        class="blue-btn" type="primary" 
                        @click="reEdit" icon="form">重新编辑</a-button>

                        <a-button
                        v-if="programData.fwjlx !== '.pdf'"
                        style="margin-right: 15px;" 
                        class="blue-btn" type="primary" 
                        @click="saveFiles" icon="folder">保存</a-button>

                        <!-- <a-button
                        v-if="programData.fwjlx !== '.pdf'"
                        style="margin-right: 15px;" 
                        class="blue-btn" type="primary" 
                        @click="generatePDFClick">生成PDF</a-button>

                        <a-button
                        v-if="programData.fwjlx == '.pdf'"
                        style="margin-right: 15px;" 
                        class="blue-btn" type="primary" 
                        @click="stampClick">盖章</a-button>

                        <a-button
                        v-if="programData.fwjlx !== '.pdf'"
                        style="margin-right: 15px;"
                        class="blue-btn" type="primary" 
                        @click="generatePDFStampClick">生成PDF并盖章</a-button> -->

                        <a-button 
                        v-if="programData.fwjlx !== '.pdf'"
                        class="blue-btn" type="primary" 
                        @click="reSelectTemplate" icon="select">重新选择模板</a-button>
                    </div>
                    <div :key="iframeKey" style="display: flex;justify-content: center;">
                        <iframe 
                            v-if="programDataiframeSrc"
                            :key="iframeKey"
                            :src="programDataiframeSrc" 
                            ref="iframeServerEditingRef" 
                            scrolling="auto" 
                            width="100%"
                            :height="(windowInnerHeight -295 )+'px'"
                            style="border: 0;"
                        ></iframe>
                        <span v-else>当前文件发生错误，请刷新！</span>
                    </div>
                    <!-- {{ programData }} -->
                </div>
                <div v-else>
                    <span style="color: red;font-weight: 600;">(注：当前暂无审评报告文件，请先选择模板进行审评报告制作)</span>
                    <selectTemplateNoModel ref="selectTemplateNoModelRef" @selectTemplateComplete="selectTemplateCompleteNoModel" />
                </div>
                <!-- <div style="width: 100%;display: flex;justify-content: flex-end;margin-top: 15px;">
                    <a-button class="blue-btn" type="primary" @click="activeKey = '缺陷报告'" icon="arrow-right" style="margin-right: 15px;">下一步</a-button>
                </div> -->
            </div>
            <div v-show="activeKey == '缺陷报告'&&currentSteps == 2" >
                <div v-if="defectReportData.id" :key="defectReportKey">
                    <div>
                        <a-button
                        style="margin-right: 15px;" 
                        class="blue-btn" type="primary" 
                        @click="refreshFile" icon="reload">刷新</a-button>

                        <a-button
                        style="margin-right: 15px;" 
                        class="blue-btn" type="primary" 
                        @click="downloadFiles(defectReportData)" icon="download">下载签字</a-button>

                        <a-button
                        v-if="defectReportData.fwjlx == '.pdf'"
                        style="margin-right: 15px;" 
                        class="blue-btn" type="primary" 
                        @click="reEdit" icon="form">重新编辑</a-button>

                        <a-button
                        v-if="defectReportData.fwjlx !== '.pdf'"
                        style="margin-right: 15px;" 
                        class="blue-btn" type="primary" 
                        @click="saveFiles" icon="folder">保存</a-button>

                        <a-button
                        v-if="defectReportData.fwjlx !== '.pdf'"
                        style="margin-right: 15px;" 
                        class="blue-btn" type="primary" 
                        @click="generatePDFClick" icon="file-pdf">生成PDF</a-button>

                        <!-- <a-button
                        v-if="defectReportData.fwjlx == '.pdf'"
                        style="margin-right: 15px;" 
                        class="blue-btn" type="primary" 
                        @click="stampClick" icon="audit">盖章</a-button>

                        <a-button
                        v-if="defectReportData.fwjlx !== '.pdf'"
                        style="margin-right: 15px;"
                        class="blue-btn" type="primary" 
                        @click="generatePDFStampClick" icon="audit">生成PDF并盖章</a-button> -->

                        <a-button 
                        v-if="defectReportData.fwjlx !== '.pdf'"
                        class="blue-btn" type="primary" 
                        @click="reSelectTemplate" icon="select">重新选择模板</a-button>
                    </div>
                    <div :key="iframeKey" style="display: flex;justify-content: center;">
                        <iframe 
                            v-if="defectReportDataiframeSrc"
                            :key="iframeKey"
                            :src="defectReportDataiframeSrc" 
                            ref="iframeServerEditingRef" 
                            scrolling="auto" 
                            width="100%"
                            :height="(windowInnerHeight -295 )+'px'"
                            style="border: 0;"
                        ></iframe>
                        <span v-else>当前文件发生错误，请刷新！</span>
                    </div>
                    <!-- {{ defectReportData }} -->
                </div>
                <div v-else>
                    <span style="color: red;font-weight: 600;">(注：当前暂无缺陷报告文件，请先选择模板进行缺陷报告制作)</span>
                    <selectTemplateNoModel ref="selectTemplateNoModel2Ref" @selectTemplateComplete="selectTemplateCompleteNoModel" />
                </div>
                <!-- <div style="width: 100%;display: flex;justify-content: flex-end;margin-top: 15px; ">
                    <a-button style="margin-right: 15px;" class="blue-btn" type="primary" @click="activeKey = '技术审评材料汇总'" icon="arrow-right">下一步</a-button>
                </div> -->
            </div>
            <a-drawer
                :title="reportName"
                placement="right"
                :closable="true"
                :visible="reportTemplateVisible"
                @close="reportTemplateVisible = false"
                width="50%"
            >
                <div :key="reportTemplateKey">
                    <a-radio-group name="radioGroup" v-model:value="reportTemplatefmbly" @change="reportTemplateRadioChange" style="margin-bottom: 10px;">
                        <a-radio value="个人">个人</a-radio>
                        <a-radio value="审评中心">审评中心</a-radio>
                        <a-radio value="其他审评员">其他审评员</a-radio>
                    </a-radio-group>
                    <div>
                        <a-input-search
                            :key="reportTemplateKey"
                            placeholder="请输入内容"
                            enter-button="搜索"
                            @search="onSearchReportTemplate"
                        />
                    </div>
                    <div style="height: calc(100vh - 200px);overflow-y: auto;">
                        <a-list :data-source="reportTemplateList" :loading="reportTemplateLoading">
                            <a-list-item slot="renderItem" slot-scope="item, index" :key="index">
                                <div style="width: 300px;" @click="selelctDescribeText(item.fmbnr)">{{ item.fmbnr }}</div>
                                <span>{{ item.fdycs }}
                                    <span v-if="index !== 0">次</span>
                                </span>
                                <div slot="actions" v-if="fmbly == '个人'">
                                    <a-button v-if="index !== 0" size="small" class="red-btn" type="primary" @click="deleteDescribe(item)" icon="delete">删除</a-button>
                                    <span v-else style="width: 48px;display: inline-block;text-align: center;">操作</span>
                                </div>
                            </a-list-item>
                        </a-list>
                    </div>
                    <a-pagination
                    v-if="totalDescribe"
                    :key="paginationKey"
                    show-size-changer
                    v-model="paginationDescribe.pageNo" 
                    :default-current="paginationDescribe.pageNo"
                    :total="totalDescribe" 
                    :page-size="paginationDescribe.pageSize"
                    @change="paginationChange"
                    @showSizeChange="paginationChange" />
                </div>
            </a-drawer>
            <!-- v-if="activeKey == '会议签到' -->
            <div v-if="currentSteps == 0 && !currentRow.isTopTabs">
                <onSiteInspectionCheckInIndex ref="onSiteInspectionCheckInIndexRef" @completeRegistrationChange="completeRegistrationChange" />
                
                <table border bordercolor="#d9d9d9" style="width: 100%; ">
                    <tr style="background: #dee5ed !important;">
                        <th style="width: 160px;">审评组材料目录</th>
                        <th>文件</th>
                        <th style="width: 270px;">操作</th>
                    </tr>
                    <tr v-for="(item,index) in firstMeetingInspectionTeamList" :key="index">
                        <td style="text-align: center;">
                            <div style="display: flex;align-items: center;">
                                <span style="color: #ed5565;font-size: 20px;"
                                v-if="item.clmc == '无利益冲突声明' || item.clmc == '技术审评纪律' || item.clmc == '技术审评会议签到表' || item.clmc == '技术审评审评员承诺书'"
                                >*</span>
                                <span>{{ item.clmc }}</span>
                            </div>
                        </td>
                        <td>
                            <div class="file-for-box">
                                <div style="display: flex;flex-wrap: wrap;">
                                    <div v-for="(trem,tIndex) in item.wjList" class="toolbox-fileList-box"
                                    style="display: flex;align-items: center;flex-direction: row;height: auto;">
                                        
                                        <div class="toolbox-file-coontern" style="margin-right: 5px;flex: 1;">
                                            <a-tooltip placement="rightBottom">
                                                <template slot="title">
                                                <span>{{ trem.fwjxsmc+trem.fwjlx }}</span>
                                                </template>
                                                <span class="toolbox-file-name" style="-webkit-line-clamp: 1;"><a href="#">{{ trem.fwjxsmc+trem.fwjlx }}</a></span>
                                            </a-tooltip>
                                            
                                        </div>
                                        <div class="fileList-icon-btn" style="flex: none;">
                                            <a-icon type="download" class="toolbox-download-icon-type" style="display: inline-block;margin-right: 5px;font-size:16px;" @click="downloadFiles(trem)"/>
                                            <a-icon type="eye" class="toolbox-eye-icon-type" style="padding: 0;margin: 0;margin-right: 5px;" @click="viewClick(trem)" v-if="trem.type == '.pdf'"/>
                                            <a-icon type="delete" class="toolbox-delete-icon-type" style="display: inline-block;margin-right: 5px;" @click="producerDelete(trem)"/>
                                        </div>
                                    </div>
                                </div>
                                <!-- <div class="file-for-v" v-for="(trem,tIndex) in item.wjList" :key="tIndex">
                                    <div class="file-icon-box">
                                        <div class="right-box">
                                            //<a-icon class="fileicon-v" type="form" @click="editClick(trem)" />
                                            <a-icon class="fileicon-v deleteicon-v" type="delete" @click="producerDelete(trem)"/>
                                        </div>
                                        <a-icon class="file-icon-v" type="file-pdf" />
                                        <div class="right-box">
                                            //<a-upload style="display: inline-block;" :beforeUpload="$event=>{return false}" :showUploadList="false" action="" @change="producerUpload($event,trem)">
                                                <a-icon class="fileicon-v" type="upload" />
                                            </a-upload>
                                            //
                                            <a-icon class="fileicon-v" type="eye" @click="viewClick(trem)" v-if="trem.fwjlx == '.pdf'" />
                                            <a-icon class="fileicon-v" type="download" @click="downloadFiles(trem)"/>
                                        </div>
                                    </div>
                                    <a @click="downloadFiles(trem)" class="name-fclmc-text">{{ trem.fwjxsmc+trem.fwjlx }}</a>
                                </div> -->
                            </div>
                        </td>
                        <td v-if="item.clmc !== '客户满意度调查表'">
                            <!-- <a-button
                            class="blue-btn" 
                            style="margin:3px 0;margin-right: 5px;"
                            type="primary" @click="initWjjlServe(item.clmc)">生成记录</a-button> -->
                            <a-button
                            v-if="item.clmc == '技术审评会议签到表'"
                            class="green-l-btn" 
                            style="margin:3px 0;margin-right: 5px;width: 124px;"
                            type="primary" @click="generateFilesClick(item.clmc)" icon="download">生成签到表</a-button>
                            <a-button
                            class="green-l2-btn" 
                            style="margin:3px 0;margin-right: 5px;width: 124px;"
                            type="primary" @click="selectFileCahnge(item.clmc)" icon="download">下载模板</a-button>
                            <a-button
                            v-if="item.clmc == '技术审评会议签到表' || item.clmc == '技术审评纪律'"
                            class="green-btn" 
                            style="margin:3px 0;margin-right: 5px;width: 124px;"
                            type="primary" @click="signatureFormCahnge(item.clmc)" icon="download">下载签字模板</a-button>
                            

                            <!-- <a-button
                            style="margin:3px 0;margin-right: 5px;"
                            class="blue-btn" 
                            type="primary" @click="batchUploadCahnge(item.clmc)">批量上传</a-button> -->
                            <a-upload style="display: inline-block;" :beforeUpload="$event=>{return false}" :showUploadList="false" action="" @change="singleUploadCahnge($event,item.clmc)">
                                <a-button
                                class="blue-btn" 
                                style="width: 124px;"
                                type="primary" icon="upload">上传</a-button>
                            </a-upload>

                            <!-- <a-button
                            style="margin:3px 0;margin-right: 5px;"
                            class="blue-btn" 
                            type="primary" @click="downloadTemplateCahnge(item.clmc)">下载模板</a-button> -->
                            
                        </td>
                        <td v-else>

                        </td>
                    </tr>
                </table>
                <div style="display: flex;justify-content: flex-end;margin-top: 10px;">
                    <a-button
                        class="blue-btn" 
                        type="primary" @click="packageDownloadClick()" icon="download"
                    >打包下载企业材料</a-button>
                </div>
                <table border bordercolor="#d9d9d9" style="width: 100%; margin-top: 3px;margin-bottom: 50px;">
                    <tr style="background: #dee5ed !important;">
                        <th style="width: 160px;">企业材料目录</th>
                        <th>文件</th>
                        <th style="width: 270px;">操作</th>
                    </tr>
                    <tr v-for="(item,index) in firstMeetingEnterpriseList" :key="index">
                        <td style="text-align: center;">
                            <div style="display: flex;align-items: center;">
                                <span style="color: #ed5565;font-size: 20px;"
                                v-if="item.clmc == '无利益冲突声明' || item.clmc == '技术审评纪律' || item.clmc == '技术审评会议签到表' || item.clmc == '技术审评审评员承诺书'"
                                >*</span>
                                <span>{{ item.clmc }}</span>
                            </div>
                        </td>
                        <td>
                            <div class="file-for-box">
                                <div style="display: flex;flex-wrap: wrap;">
                                    <div v-for="(trem,tIndex) in item.wjList" class="toolbox-fileList-box"
                                    style="display: flex;align-items: center;flex-direction: row;height: auto;">
                                        
                                        <div class="toolbox-file-coontern" style="margin-right: 5px;flex: 1;">
                                            <a-tooltip placement="rightBottom">
                                                <template slot="title">
                                                <span>{{ trem.fwjxsmc+trem.fwjlx }}</span>
                                                </template>
                                                <span class="toolbox-file-name" style="-webkit-line-clamp: 1;"><a href="#">{{ trem.fwjxsmc+trem.fwjlx }}</a></span>
                                            </a-tooltip>
                                            
                                        </div>
                                        <div class="fileList-icon-btn" style="flex: none;">
                                            <a-icon type="download" class="toolbox-download-icon-type" style="display: inline-block;margin-right: 5px;font-size:16px;" @click="downloadFiles(trem)"/>
                                            <a-icon type="eye" class="toolbox-eye-icon-type" style="padding: 0;margin: 0;margin-right: 5px;" @click="viewClick(trem)" v-if="trem.type == '.pdf'"/>
                                            <a-icon type="delete" class="toolbox-delete-icon-type" style="display: inline-block;margin-right: 5px;" @click="producerDelete(trem)"/>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </td>
                        <td v-if="item.clmc !== '客户满意度调查表'">
                            <!-- <a-button
                            class="blue-btn" 
                            style="margin:3px 0;margin-right: 5px;"
                            type="primary" @click="initWjjlServe(item.clmc)">生成记录</a-button> -->

                            <a-button
                            class="green-l2-btn" 
                            style="margin:3px 0;margin-right: 5px;width: 124px;"
                            type="primary" @click="selectFileCahnge(item.clmc)" icon="download">下载模板</a-button>

                            <!-- <a-button
                            style="margin:3px 0;margin-right: 5px;"
                            class="blue-btn" 
                            type="primary" @click="batchUploadCahnge(item.clmc)">批量上传</a-button> -->
                            <a-upload style="display: inline-block;" :beforeUpload="$event=>{return false}" :showUploadList="false" action="" @change="singleUploadCahnge($event,item.clmc)">
                                <a-button
                                class="blue-btn" 
                                style="width: 124px;"
                                type="primary" icon="upload">上传</a-button>
                            </a-upload>

                            <!-- <a-button
                            style="margin:3px 0;margin-right: 5px;"
                            class="blue-btn" 
                            type="primary" @click="downloadTemplateCahnge(item.clmc)">下载模板</a-button> -->
                            
                        </td>
                        <td v-else>

                        </td>
                    </tr>
                </table>
                <div class="nextStep-box">
                    <a-button style="margin: 5px;" class="blue-btn" type="primary" @click="nextStepClick('下一步',1)" >下一步</a-button>
                </div>
            </div>
            <div v-if="currentSteps == 1 && !currentRow.isTopTabs">
                <div >
                    <div>
                        <a-button
                        style="margin-right: 15px;" 
                        class="blue-btn" type="primary" 
                        @click="refreshFile" icon="reload">刷新</a-button>

                        <a-button
                        style="margin-right: 15px;" 
                        class="blue-btn" type="primary" 
                        @click="downloadFiles(xcjcbjData)" icon="download">下载</a-button>

                        <a-button
                        v-if="xcjcbjData.fwjlx == '.pdf'"
                        style="margin-right: 15px;" 
                        class="blue-btn" type="primary" 
                        @click="reEdit" icon="form">重新编辑</a-button>

                        <a-button
                        v-if="xcjcbjData.fwjlx !== '.pdf'"
                        style="margin-right: 15px;" 
                        class="blue-btn" type="primary" 
                        @click="saveFiles" icon="folder">保存</a-button>

                        <a-button
                        v-if="xcjcbjData.fwjlx !== '.pdf'"
                        style="margin-right: 15px;" 
                        class="blue-btn" type="primary" 
                        @click="generatePDFClick" icon="file-pdf">生成PDF</a-button>
                    </div>
                    <div :key="iframeKey" style="display: flex;justify-content: center;">
                        <iframe 
                            v-if="xcjcbjiframeSrc"
                            :key="iframeKey"
                            :src="xcjcbjiframeSrc" 
                            ref="iframeServerEditingRef" 
                            scrolling="auto" 
                            width="100%"
                            :height="(windowInnerHeight -250 )+'px'"
                            style="border: 0;"
                        ></iframe>
                        <span v-else>当前文件发生错误，请刷新！</span>
                    </div>
                    <!-- {{ defectReportData }} -->
                </div>
            </div>
            <div v-if="(currentSteps == 3 && !currentRow.isTopTabs) || activeKey == '技术审评材料汇总'">
                <onSiteInspectionCheckInIndex v-if="!currentRow.isTopTabs" ref="onSiteInspectionCheckInMociRef" />
                <table border bordercolor="#d9d9d9" style="width: 100%; margin-bottom: 50px;">
                    <tr style="background: #dee5ed !important;">
                        <th style="width: 160px;">审评组材料目录</th>
                        <th>文件</th>
                        <th style="width: 270px;">操作</th>
                    </tr>
                    <tr v-for="(item,index) in materialSummaryList" :key="index" v-if="item.clmc.indexOf('康洁自律反馈表') == -1">
                        <td style="text-align: center;">
                            <div style="display: flex;align-items: center;">
                                <span style="color: #ed5565;font-size: 20px;"
                                v-if="item.clmc == '无利益冲突声明' || item.clmc == '技术审评纪律' || item.clmc == '技术审评会议签到表' || item.clmc == '技术审评审评员承诺书'"
                                >*</span>
                                <span>{{ item.clmc }}</span>
                            </div>
                        </td>
                        <td>
                            <div style="display: flex;align-items: flex-start;">
                                <div class="file-for-box" style="flex: 1;">
                                    <div style="display: flex;flex-wrap: wrap;">
                                        <div v-for="(trem,tIndex) in item.wjList" class="toolbox-fileList-box"
                                        style="display: flex;align-items: center;flex-direction: row;height: auto;">
                                            
                                            <div class="toolbox-file-coontern" style="margin-right: 5px;flex: 1;">
                                                <a-tooltip placement="rightBottom">
                                                    <template slot="title">
                                                    <span>{{ trem.fwjxsmc+trem.fwjlx }}</span>
                                                    </template>
                                                    <span class="toolbox-file-name" style="-webkit-line-clamp: 1;"><a href="#">{{ trem.fwjxsmc+trem.fwjlx }}</a></span>
                                                </a-tooltip>
                                                
                                            </div>
                                            <div class="fileList-icon-btn" style="flex: none;">
                                                <a-icon type="download" class="toolbox-download-icon-type" style="display: inline-block;margin-right: 5px;font-size:16px;" @click="downloadFiles(trem)"/>
                                                <a-icon type="eye" class="toolbox-eye-icon-type" style="padding: 0;margin: 0;margin-right: 5px;" @click="viewClick(trem)" v-if="trem.type == '.pdf'"/>
                                                <a-icon type="delete" class="toolbox-delete-icon-type" style="display: inline-block;margin-right: 5px;" @click="producerDelete(trem)"/>
                                            </div>
                                        </div>
                                    </div>
                                    <!-- <div class="file-for-v" v-for="(trem,tIndex) in item.wjList" :key="tIndex">
                                        <div class="file-icon-box">
                                            <div class="right-box">
                                                //<a-icon class="fileicon-v" type="form" @click="editClick(trem)" />
                                                <a-icon class="fileicon-v deleteicon-v" type="delete" @click="producerDelete(trem)"/>
                                            </div>
                                            <a-icon class="file-icon-v" type="file-pdf" />
                                            <div class="right-box">
                                                //<a-upload style="display: inline-block;" :beforeUpload="$event=>{return false}" :showUploadList="false" action="" @change="producerUpload($event,trem)">
                                                    <a-icon class="fileicon-v" type="upload" />
                                                </a-upload>
                                                //
                                                <a-icon class="fileicon-v" type="eye" @click="viewClick(trem)" v-if="trem.fwjlx == '.pdf'" />
                                                <a-icon class="fileicon-v" type="download" @click="downloadFiles(trem)"/>
                                            </div>
                                        </div>
                                        <a @click="downloadFiles(trem)" class="name-fclmc-text">{{ trem.fwjxsmc+trem.fwjlx }}</a>
                                    </div> -->
                                </div>
                                <div v-if="item.clmc == '客户满意度调查表'">
                                    <canvas :key="canvasKey" :id="canvasId" width="200px" height="200px"></canvas>
                                    <div style="text-align: center;">
                                        <a-button class="blue-btn" type="primary" @click="linkClick()">链接</a-button>
                                        <a-button class="blue-btn" type="primary" @click="downloadCanvasClick()">下载二维码</a-button>
                                    </div>
                                </div>
                            </div>
                        </td>
                        <td v-if="item.clmc !== '客户满意度调查表'">
                            <!-- <a-button
                            class="blue-btn" 
                            style="margin:3px 0;margin-right: 5px;"
                            type="primary" @click="initWjjlServe(item.clmc)">生成记录</a-button> -->
                            <a-button
                            v-if="item.clmc == '技术审评会议签到表'"
                            class="green-l-btn" 
                            style="margin:3px 0;margin-right: 5px;width: 124px;"
                            type="primary" @click="generateFilesClick(item.clmc)" icon="download">生成签到表</a-button>
                            <a-button
                            class="green-l2-btn" 
                            style="margin:3px 0;margin-right: 5px;width: 124px;"
                            type="primary" @click="selectFileCahnge(item.clmc)" icon="download">下载模板</a-button>
                            <a-button
                            v-if="item.clmc == '技术审评会议签到表' || item.clmc == '技术审评纪律'"
                            class="green-btn" 
                            style="margin:3px 0;margin-right: 5px;width: 124px;"
                            type="primary" @click="signatureFormCahnge(item.clmc)" icon="download">下载签字模板</a-button>
                            

                            <!-- <a-button
                            style="margin:3px 0;margin-right: 5px;"
                            class="blue-btn" 
                            type="primary" @click="batchUploadCahnge(item.clmc)">批量上传</a-button> -->
                            <a-upload style="display: inline-block;" :beforeUpload="$event=>{return false}" :showUploadList="false" action="" @change="singleUploadCahnge($event,item.clmc)">
                                <a-button
                                class="blue-btn" 
                                style="width: 124px;"
                                type="primary" icon="upload">上传</a-button>
                            </a-upload>

                            <!-- <a-button
                            style="margin:3px 0;margin-right: 5px;"
                            class="blue-btn" 
                            type="primary" @click="downloadTemplateCahnge(item.clmc)">下载模板</a-button> -->
                            
                        </td>
                        <td v-else>

                        </td>
                    </tr>
                </table>
            </div>
            
            <!-- <div v-show="activeKey == '审评方案拟定'" >
                <planProductionProduction ref='planProductionProductionRef' :key="planProductionProductionKey"/>
            </div> -->
            <!-- activeKey == '技术审评材料汇总' -->
            <div v-show="false">
                <div style="text-align: right;padding: 5px;">
                </div>
                <table border bordercolor="#d9d9d9" style="width: 100%; ">
                    <tr>
                        <th style="width: 160px;">材料目录</th>
                        <th>文件</th>
                        <th style="width: 220px;">
                            操作
                            
                        </th>
                    </tr>
                    <tr v-for="(item,index) in materialSummaryList" :key="index">
                        <td style="text-align: center;">
                            <div style="display: flex;align-items: center;">
                                <span style="color: #ed5565;font-size: 20px;"
                                v-if="item.clmc == '无利益冲突声明' || item.clmc == '技术审评纪律' || item.clmc == '技术审评会议签到表' || item.clmc == '技术审评审评员承诺书'"
                                >*</span>
                                <span>{{ item.clmc }}</span>
                            </div>
                        </td>
                        <td>
                            <div class="file-for-box">
                                <div style="display: flex;flex-wrap: wrap;">
                                    <div v-for="(trem,tIndex) in item.wjList" class="toolbox-fileList-box"
                                    style="display: flex;align-items: center;flex-direction: row;height: auto;">
                                        
                                        <div class="toolbox-file-coontern" style="margin-right: 5px;flex: 1;">
                                            <a-tooltip placement="rightBottom">
                                                <template slot="title">
                                                <span>{{ trem.fwjxsmc+trem.fwjlx }}</span>
                                                </template>
                                                <span class="toolbox-file-name" style="-webkit-line-clamp: 1;"><a href="#">{{ trem.fwjxsmc+trem.fwjlx }}</a></span>
                                            </a-tooltip>
                                            
                                        </div>
                                        <div class="fileList-icon-btn" style="flex: none;">
                                            <a-icon type="download" class="toolbox-download-icon-type" style="display: inline-block;margin-right: 5px;font-size:16px;" @click="downloadFiles(trem)"/>
                                            <a-icon type="eye" class="toolbox-eye-icon-type" style="padding: 0;margin: 0;margin-right: 5px;" @click="viewClick(trem)" v-if="trem.type == '.pdf'"/>
                                            <a-icon type="delete" class="toolbox-delete-icon-type" style="display: inline-block;margin-right: 5px;" @click="producerDelete(trem)"/>
                                        </div>
                                    </div>
                                </div>
                                <!-- <div class="file-for-v" v-for="(trem,tIndex) in item.wjList" :key="tIndex">
                                    <div class="file-icon-box">
                                        <div class="right-box">
                                            //<a-icon class="fileicon-v" type="form" @click="editClick(trem)" />
                                            <a-icon class="fileicon-v deleteicon-v" type="delete" @click="producerDelete(trem)"/>
                                        </div>
                                        <a-icon class="file-icon-v" type="file-pdf" />
                                        <div class="right-box">
                                            //<a-upload style="display: inline-block;" :beforeUpload="$event=>{return false}" :showUploadList="false" action="" @change="producerUpload($event,trem)">
                                                <a-icon class="fileicon-v" type="upload" />
                                            </a-upload>
                                            //
                                            <a-icon class="fileicon-v" type="eye" @click="viewClick(trem)" v-if="trem.fwjlx == '.pdf'" />
                                            <a-icon class="fileicon-v" type="download" @click="downloadFiles(trem)"/>
                                        </div>
                                    </div>
                                    <a @click="downloadFiles(trem)" class="name-fclmc-text">{{ trem.fwjxsmc+trem.fwjlx }}</a>
                                </div> -->
                            </div>
                        </td>
                        <td v-if="item.clmc !== '客户满意度调查表'">
                            <!-- <a-button
                            class="blue-btn" 
                            style="margin:3px 0;margin-right: 5px;"
                            type="primary" @click="initWjjlServe(item.clmc)">生成记录</a-button> -->

                            <a-button
                            class="green-l2-btn" 
                            style="margin:3px 0;margin-right: 5px;width: 124px;"
                            type="primary" @click="selectFileCahnge(item.clmc)" icon="download">下载模板</a-button>

                            <!-- <a-button
                            style="margin:3px 0;margin-right: 5px;"
                            class="blue-btn" 
                            type="primary" @click="batchUploadCahnge(item.clmc)">批量上传</a-button> -->
                            <a-upload style="display: inline-block;" :beforeUpload="$event=>{return false}" :showUploadList="false" action="" @change="singleUploadCahnge($event,item.clmc)">
                                <a-button
                                class="blue-btn" 
                                style="width: 124px;"
                                type="primary" icon="upload">上传</a-button>
                            </a-upload>

                            <!-- <a-button
                            style="margin:3px 0;margin-right: 5px;"
                            class="blue-btn" 
                            type="primary" @click="downloadTemplateCahnge(item.clmc)">下载模板</a-button> -->
                            
                        </td>
                        <td v-else>

                        </td>
                    </tr>
                </table>
                <div style="width: 100%;display: flex;justify-content: flex-end;margin-top: 15px;" v-if="!currentRow.isTopTabs">
                    <a-button class="blue-btn" type="primary" @click="submitOnSite('spcysubmitFlow')" >提交技术审评任务</a-button>
                </div>
            </div>
            <div v-show="activeKey == '材料审查'">
                <materialReviewExamination ref="materialReviewExaminationRef" :key="materialReviewExaminationKey" />
            </div>
            <div v-show="activeKey == '申请信息'  || activeKey == '环节流转记录'" style="height: 100%;overflow: hidden;">
                <a-spin size="large" :spinning="modalSpinningPrice" tip="正在加载中...">
                    <eventSet :key="eventSetKey" ref="eventSetRef" @updatedSuccess="eventupdatedSuccess"/>
                </a-spin>
            </div>
        </div>
        <!-- 审评方案拟定 -->
        <div v-if="currentSteps == 1 || currentSteps == 2 || currentSteps == 3">
            <div class="nextStep-box">
                <a-button class="blue-btn" style="margin:5px;" type="primary" @click="nextStepClick('上一步',currentSteps-1)" >上一步</a-button>
                <a-button v-if="currentSteps !== 3" class="blue-btn" style="margin:5px;" type="primary" @click="nextStepClick('下一步',currentSteps+1)" >下一步</a-button>
            </div>
        </div>
        <a-modal
            v-model:visible="planMaterialsvisible"
            title="审评方案材料"
            @ok="planMaterialsvisible = false"
            width="100%"
            wrapClassName="plan-materials-full-modal"
            :footer=null
        >
            <planProductionProduction ref='planProductionProductionRef' :key="planProductionProductionKey"/>
        </a-modal>
        <selectTemplateDownload ref="selectTemplateDownloadRef" />
        <selectTemplate ref="selectTemplateRef" @selectTemplateComplete="selectTemplateCompleteNoModel"/>
        <serverEditingView ref="serverEditingViewRef" @refreshChange="$event=>{}"/>
        <serverEditing ref="serverEditingRef" @refreshChange="refreshChange"/>
    </div>
</template>
<script>
import selectTemplateDownload from '@/components/selectTemplate/selectTemplate-download.vue'
import serverEditing from '@/components/comp-model-series/server-editing.vue'
import serverEditingView from '@/components/comp-model-series/server-editing-view'
import selectTemplate from '@/components/selectTemplate/selectTemplate.vue'
import onSiteInspectionCheckInIndex from '../../../../onSiteInspectionCheck-In/index.vue'
import { 
    spcygetJcqkzgMb,
    spcysaveFlow,
    spcyaddJcqkzsMb,
    spcydeleteJcyj,
    spcyqueryXcjczjByNowUser,
    spcyupdatwXcjczj,
    spcygetXcjczjMsmbList,
    spcyselectHistoryMsmb,
    spcyqueryListXcjcwtBySqsxId,
    spcyqueryPageXcjcHistoryTkListByXcjcZjId,
    spcyselectHistoryXcjcwt,
    spcyaddXcjcWt,
    spcyupdatwXcjcwt,
    spcyqueryPageTkListByZjId,
    spcyagainXcjcwttk,
    spcyaddXcjcwttk,
    spcydeleteXcjcwttk,
    spcygenerateXcjcConclusion,
    spcygetJcbgMb,
    spcygetQxbgMb,
    spcyaddJcbgMb,
    spcyaddQxbgMb,
    spcyqueryXcjcFileMl,
    commoninitWjjl,
    uploadPdfFileById,
    spcySqsxWjjldeleteFileById,
    spcySqsxWjjlgetLocalFileById,
    spcydownloadSqsxFileMb,
    spcyuploadSqsxFile,
    spcygetXcjcbgFile,
    spcygetXcjcqxbgFile,
    spcydeleteXcjcwt,

    getWebOfficeDownloadFile,
    webOfficeApiopenFile,
    openFileReadOnly,
    getDocxToPdf,
    againEditPdfOnlineFile,
    getDocxToPdfAndGz,
    pdfFileHcCa,
    wjjbxxPageList,
    xcjcjdqueryDqJdmc,
    xcjcjdpreviousNode,
    xcjcjdnextNode,
    spcyqueryWjMlBySchyJc,
    spcyqueryWjMlBySchyQy,
    initWjgetXcjcblFile,
    sqsxYwxxHtmlToFileByXcjchy,
    sqsxYwxxdownHtmlToFileByXcjchy,
    sqsxYwxxdownHtmlToFileByXcjcjl,
    spcydownZipZxclQy,
} from './service/index'
 import YchConstant from "@/api/YchConstant";
 import blobType from '@/common/blobType'
 import eventSet from '../taskAcceptance/eventSet.vue'
import { now } from 'xe-utils';
import handlingOpinionsDescribe from '@/components/handling-opinions/handling-opinions-describe.vue'
import assessCheckApi from './service/api'
import moment from 'moment'
import compSelector from '@/components/compSelector/compSelector'
import commpVxeTable from '@/components/commp-vxe-table/commp-vxe-table.vue'
import selectTemplateNoModel from '@/components/selectTemplate/selectTemplate-noModel.vue'
import materialReviewExamination from '../materialReview/examination.vue'
import planProductionProduction from '../planProduction/production.vue'
import {qrcanvas} from 'qrcanvas'
export default {
    components:{
        eventSet,
        handlingOpinionsDescribe,
        compSelector,
        commpVxeTable,
        selectTemplateDownload,
        serverEditing,
        serverEditingView,
        selectTemplateNoModel,
        selectTemplate,
        materialReviewExamination,
        onSiteInspectionCheckInIndex,
        planProductionProduction,
        
    },
    props:{

    },
    data(){
        return{
            modalSpinningPrice:true,
            activeKey:'',
            currentRow:{},
            eventSetKey:null,
            allStatusKey:null,
            onSiteInspectionKey:null,
            //描述模板
            inputSearchKey:null,
            drawerVisible:false,
            drawerKey:null,
            describeLoading:false,
            describeTemp:{},
            paginationDescribe:{
                pageNo:1,
                pageSize:10,
            },
            totalDescribe:0,
            describeList:[],
            fmbnrSearch:'',
            fmbly:'个人',
            paginationKey:null,

            //审评总体情况
            overallNum:{
                hjSize:0,
                wcSize:0,
                wwcSize:0,
            },
            overallKey:null,
            chapterList:[],
            chapterRow:{
                index:0,
            },
            chapterActiveKey:'情况描述',
            situationDescriptionVisible:false,
            chapterdrawerKey:null,
            chapterRadio:'我写过的描述',
            searchSituationText:'',
            situationList:[],
            situationLoading:false,
            chapterIssuesList:[],
            chapterIssuesSpinning:false,
            problemHistoryList:[],
            problemHistoryVisible:false,
            problemHistoryLoading:false,
            searchProblemHistoryText:'',
            problemHistoryKey:null,
            currentTerms:{item:{},trem:{}},

            termItemVisible:false,
            termItemKey:null,
            termItemList:[],
            termItemLoading:false,
            searchTermItemText:'',
            reportName:'',

            reportTemplateVisible:false,
            reportTemplateKey:null,
            reportTemplateList:[],
            reportTemplateLoading:false,
            reportTemplateSearchText:'',
            reportTemplatefmbly:'个人',
            programData:{},
            defectReportData:{},
            iframeKey:null,

            //技术审评材料汇总
            materialSummaryList:[],
            chapterIssuesKey:null,
            programDataiframeSrc:'',
            defectReportDataiframeSrc:'',
            xcjcbjData:{},
            xcjcbjiframeSrc:'',
            programKey:null,
            defectReportKey:null,
            windowInnerHeight:window.innerHeight,
            materialReviewExaminationKey:null,
            planProductionProductionKey:null,
            questionnaireId:'',
            currentSteps:0,
            stepsArr:['首次会议','技术审评笔记','审评报告制作','末次会议'],
            firstMeetingInspectionTeamList:[],
            firstMeetingEnterpriseList:[],
            planMaterialsvisible:false,
            canvasKey:null,
            canvasId:'signedVersion'+ new Date().getTime(),
            queryResultsQr:null,
        }
    },
    watch:{

    },
    mounted(){
        
    },
    methods:{
        async getData(row){
            await xcjcjdqueryDqJdmc({sqsxid:row.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log('获取到什么节点',res)
                    this.currentSteps = this.stepsArr.indexOf(res.result)<0?0:this.stepsArr.indexOf(res.result)
                }else{
                    this.currentSteps = 0
                }
            })
            //isZZState 是否是组长
            //isRwfpFlag 是否选择负责人
            //console.log('我是技术审评',row)
            this.currentRow = row
            if(!row.noFirstLoad){
                // this.activeKey = !this.currentRow.isZZState?'审评总体情况':(row.isActiveKey?row.isActiveKey:'审评情况专述')
                // this.activeKey = row.isActiveKey?row.isActiveKey:'会议签到'审评情况专述
                this.activeKey = row.isActiveKey?row.isActiveKey:'审评情况专述'
            }
            
            this.getDescribeData(this.paginationDescribe,this.fmbnrSearch,this.fmbly)
            this.getOverallSituation(this.currentRow)
            this.getMaterialSummary()
            this.programMemakeChange(this.currentRow)
            this.defectReportChange(this.currentRow)
            this.xcjcbjChange(this.currentRow)
            this.$nextTick(()=>{
                this.$refs.materialReviewExaminationRef.getData({sqsxid:row.sqsxid,isTopTabs:true,isActiveKey:'材料审查',isDisabled:true,fhjmc:row.fhjmc,reserveBottom:35,rightPreviewBoxH:window.innerHeight - 210})
            })
            this.$nextTick(()=>{
                setTimeout(() => {
                    if(this.currentSteps == 0){
                        this.$refs.onSiteInspectionCheckInIndexRef.getData({sqsxid:this.currentRow.sqsxid,fhylx:'首次会议'})
                    }else if(this.currentSteps == 3){
                        this.$refs.onSiteInspectionCheckInMociRef.getData({sqsxid:this.currentRow.sqsxid,fhylx:'末次会议'})
                    }
                    
                }, 200);
            })
            //查询问卷调查id
            wjjbxxPageList().then(res=>{
                //console.log('查询问卷调查id',res.result.records)
            })
        },
        completeRegistrationChange(val){//会议完成点击触发的方法
            if(val == '完成会议登记'){

            }else{

            }
        },
        eventupdatedSuccess(){
            this.modalSpinningPrice = false
        },
        tabPaneChange(val){
            if(val == '申请信息'  || val == '环节流转记录'){
                this.$refs.eventSetRef.getDatas({...this.currentRow,tabPaneActiveKey:val,borderisFalse:true})
                this.modalSpinningPrice = true
            }
            // if(val == '会议签到'){
            //     this.$nextTick(()=>{
            //         setTimeout(() => {
            //             this.$refs.onSiteInspectionCheckInIndexRef.getData({sqsxid:this.currentRow.sqsxid,fhylx:'首次会议'})
            //             this.$refs.onSiteInspectionCheckInMociRef.getData({sqsxid:this.currentRow.sqsxid,fhylx:'末次会议'})
            //         }, 200);
            //     })
            // }
            if(val == '审评方案拟定'){
                this.$nextTick(()=>{
                    setTimeout(() => {
                        this.$refs.planProductionProductionRef.getData({
                            sqsxid:this.currentRow.sqsxid,
                            isTopTabs:true,
                            isActiveKey:'审评方案拟定',
                            isDisabled:true,
                            fhjmc:this.currentRow.fhjmc == '现场检查'?'技术审查':this.currentRow.fhjmc,
                            reserveBottom:35,
                            rightPreviewBoxH:window.innerHeight - 70})
                    }, 200);
                })
            }
        },
        nextStepClick(val,num){
            if(val == '上一步'){
                xcjcjdpreviousNode({sqsxid:this.currentRow.sqsxid}).then(res=>{
                    if(res.code == 200){
                        this.currentSteps = num
                    }else{
                        this.$message.warning(res.message)
                    }
                    this.$nextTick(()=>{
                        if(this.currentSteps == 0){
                            this.$refs.onSiteInspectionCheckInIndexRef.getData({sqsxid:this.currentRow.sqsxid,fhylx:'首次会议'})
                        }else if(this.currentSteps == 3){
                            this.getMaterialSummary()
                            this.$refs.onSiteInspectionCheckInMociRef.getData({sqsxid:this.currentRow.sqsxid,fhylx:'末次会议'})
                        }
                    })
                })
            }else{
                xcjcjdnextNode({sqsxid:this.currentRow.sqsxid}).then(res=>{
                    if(res.code == 200){
                        this.currentSteps = num
                    }else{
                        this.$message.warning(res.message)
                    }
                    this.$nextTick(()=>{
                        if(this.currentSteps == 0){
                            this.$refs.onSiteInspectionCheckInIndexRef.getData({sqsxid:this.currentRow.sqsxid,fhylx:'首次会议'})
                        }else if(this.currentSteps == 3){
                            this.getMaterialSummary()
                            this.$refs.onSiteInspectionCheckInMociRef.getData({sqsxid:this.currentRow.sqsxid,fhylx:'末次会议'})
                        }
                    })
                })
            }
        },
        //--------------描述模板---------
        getDescribeData(pagination,val,fmbly){
            this.describeLoading = true
            spcygetJcqkzgMb({...pagination,sqsxid:this.currentRow.sqsxid,fmbnr:val,fmbly:fmbly}).then(res=>{
                if(res.code == 200){
                    //console.log('审评情况专述----------',res.result.records)
                    if(res.result.records.length){
                        res.result.records.unshift({id:'-1',fmbnr:'情况专述',fdycs:'调用次数',})
                    }
                    this.describeList = res.result.records
                    this.totalDescribe = res.result.total
                    this.inputSearchKey = Date,now()
                    this.drawerKey = Date,now()
                    this.describeLoading = false
                    this.paginationKey = Date,now()
                }else{
                    this.$message.warning(res.message)
                    this.describeLoading = false
                }
            })
        },
        fmblyChange(){
            this.paginationDescribe.pageNo = 1
            this.paginationDescribe.pageSize = 10
            this.getDescribeData(this.paginationDescribe,this.fmbnrSearch,this.fmbly)
            

        },
        selectDescribe(){
            this.drawerVisible = true
            this.fmbnrSearch = ''
            this.paginationDescribe.pageNo = 1
            this.paginationDescribe.pageSize = 10
            this.getDescribeData(this.paginationDescribe,this.fmbnrSearch,this.fmbly)
        },
        addDescribe(){
            if(this.currentRow.fjcqkzs){
                spcyaddJcqkzsMb({sqsxid:this.currentRow.sqsxid,fmbnr:this.currentRow.fjcqkzs}).then(res=>{
                    if(res.code == 200){
                        this.$message.success(res.message)
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }else{
                this.$message.warning('请先输入审评情况专述')
            }
            
        },
        paginationChange(val,size){
            //console.log(val,size)
            this.paginationDescribe.pageNo = val
            this.paginationDescribe.pageSize = size
            this.getDescribeData(this.paginationDescribe,this.fmbnrSearch,this.fmbly)
            this.getSituationHistory()
            this.getProblemBase()
            this.getQueryTerms(this.chapterRow)
            this.getReportTemplateData(this.reportName)
            this.drawerKey = Date.now()
        },
        onSearchDescribe(val){
            this.fmbnrSearch = val
            this.getDescribeData(this.paginationDescribe,val,this.fmbly)
        },
        selelctDescribeText(val){
            this.currentRow.fjcqkzs = val
            this.drawerVisible = false
            this.reportTemplateVisible = false
        },
        deleteDescribe(val){
            var that = this
            this.$confirm({
                title:'您确认要删除吗？',
                    onOk() {
                        spcydeleteJcyj({id:val.id}).then(res=>{
                            if(res.code == 200){
                                that.getDescribeData(that.paginationDescribe,that.fmbnrSearch,that.fmbly)
                                that.getReportTemplateData(that.reportName)
                                that.$message.success(res.message)
                            }else{
                                that.$message.warning(res.message)
                            }
                        })
                    }
                })
        },

        //----------审评总体情况
        getOverallSituation(val,index){
            spcyqueryXcjczjByNowUser({sqsxid:val.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log('获取章节----------',res.result.zjList)
                    this.overallNum.hjSize = res.result.hjSize
                    this.overallNum.wcSize = res.result.wcSize
                    this.overallNum.wwcSize = res.result.wwcSize
                    this.chapterList = res.result.zjList
                    this.chapterRow = res.result.zjList.length?{...res.result.zjList[index?index:0],index:index?index:0}:{}
                    this.getQueryQuestions(this.chapterRow)
                    this.overallKey = Date.now()
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        getSituationHistory(){
            this.situationLoading = true
            this.chapterdrawerKey = Date.now()
            this.inputSearchKey = Date.now()
            spcygetXcjczjMsmbList({
                ...this.paginationDescribe,
                fxcjczjid:this.chapterRow.id,
                sqsxid:this.currentRow.sqsxid,
                fmbly:this.chapterRadio,
                fmbnr:this.searchSituationText,
            }).then(res=>{//获取情况描述
                if(res.code == 200){
                    //console.log('获取情况描述-------------',res.result.records)
                    if(res.result.records.length){
                        res.result.records.unshift({id:'-1',fmbnr:'描述模板',fdycs:'调用次数',})
                    }
                    this.situationList = res.result.records
                    this.totalDescribe = res.result.total
                }else{
                    this.$message.warning(res.message)
                }
                this.situationLoading = false
            })

        },
        selectSituationText(name,value,id,index,item){
            spcyselectHistoryMsmb({id:item.id}).then(res=>{
                if(res.code == 200){

                }else{}
            })
            //console.log(name,value,id,index)
            this.situationDescriptionVisible = false
            this.savechapter(name,value,id,index)
        },
        onSearchSituation(val){
            this.searchSituationText = val
            this.getSituationHistory()
        },
        //选择章节
        fzjmcClick(row,index){
            //console.log(row)
            this.chapterRow = {...row,index:index}
            this.getQueryQuestions(this.chapterRow)
        },
        //完成状态
        chapterStatusChange(row,index){
            spcyupdatwXcjczj(row).then(res=>{
                if(res.code == 200){
                    this.getOverallSituation(this.currentRow,index)
                    this.$message.success(res.message)
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        chapterRadioChange(){//选择情况描述的类型
            this.getSituationHistory()
        },
        chapterTabPaneChange(){//选择章节情况

        },
        //选择情况描述
        situationClick(){
            this.paginationDescribe.pageNo = 1
            this.paginationDescribe.pageSize = 10
            this.situationDescriptionVisible = true
            this.getSituationHistory()
        },
        //保存情况描述
        savechapter(name,value,id,index){
            let data = {id:id}
            data[name] = value
            spcyupdatwXcjczj(data).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                }else{
                    this,$message.warning(res.message)
                }
                this.getOverallSituation(this.currentRow,index)
            })
        },

        //-------------发现问题
        getQueryQuestions(row){//查询发现问题
            this.chapterIssuesSpinning = true
            this.chapterIssuesList = []
            spcyqueryListXcjcwtBySqsxId({sqsxid:this.currentRow.sqsxid,fxcjczjid:row.id}).then(res=>{
                if(res.code == 200){
                    //console.log('查询发现问题',res.result.records)
                    this.chapterIssuesList = res.result.records
                    this.chapterIssuesKey = Date.now()
                }else{
                    this.chapterIssuesList = []
                    this.$message.warning(res.message)
                }
                this.chapterIssuesSpinning = false
            })
        },
        //查询历史库列表
        getProblemBase(){
            spcyqueryPageXcjcHistoryTkListByXcjcZjId({
                ...this.paginationDescribe,
                sqsxid:this.currentRow.sqsxid,
                fxcjczjid:this.chapterRow.id,
                gjz:this.searchProblemHistoryText
            }).then(res=>{
                if(res.code == 200){
                    //console.log('查询问题历史库',res.result.records)
                    if(res.result.records.length){
                        res.result.records.unshift({id:'-1',fzdyznr:'问题内容',fzdyzh:'对应条款',})
                    }
                    this.problemHistoryList = res.result.records
                    this.totalDescribe = res.result.total
                    this.problemHistoryKey = Date.now()
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        //打开问题历史库
        problemBaseSelect(){
            this.paginationDescribe.pageNo = 1
            this.paginationDescribe.pageSize = 10
            this.problemHistoryVisible = true
            this.getProblemBase()
        },
        //搜索历史库
        onSearchProblemHistory(val){
            this.searchProblemHistoryText = val
            this.getProblemBase()
        },
        //选择问题历史库
        SelectproblemHistory(row){
            spcyselectHistoryXcjcwt({fxcjczjid:this.chapterRow.id,id:row.id, sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    this.problemHistoryVisible = false
                    this.getQueryQuestions(this.chapterRow)
                    this.$message.success(res.message)
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        //添加问题
        addproblem(){
            spcyaddXcjcWt({sqsxid:this.currentRow.sqsxid,fxcjczjid:this.chapterRow.id}).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.getQueryQuestions(this.chapterRow)
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        //修改严重程度和问题描述
        severityChange(rowWt,name){
            //console.log(rowWt)
            let data = {id:rowWt.id}
            data[name] = rowWt[name]
            spcyupdatwXcjcwt(data).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                }else{
                    this.$message.warning(res.message)
                }
                this.getQueryQuestions(this.chapterRow)
            })
        },
        //查询条款选择列表
        getQueryTerms(row){
            this.termItemLoading = true
            spcyqueryPageTkListByZjId({
                ...this.paginationDescribe,
                sqsxid:this.currentRow.sqsxid,
                fxcjczjid:row.id,
                gjz:this.searchTermItemText,
            }).then(res=>{
                if(res.code == 200){
                    if(res.result.records.length){
                        res.result.records.unshift({id:'-1',fzdyznr:'条款内容与审评要点',fzdyzh:'对应条款',})
                    }
                    this.termItemList = res.result.records
                    this.totalDescribe = res.result.total
                }else{
                    this.$message.warning(res.message)
                }
                this.termItemLoading = false
            })
        },
        //选择条款
        selectTermItem(item,trem){
            this.currentTerms = {item:item.wt,trem:trem}
            this.getQueryTerms(this.chapterRow)
            this.termItemVisible = true
        },
        //条款搜索条件
        onSearchTermItem(val){
            this.searchTermItemText = val
            this.getQueryTerms(this.chapterRow)
        },
        //在列表上选择条款
        SelectTermItemItem(row){
            if(this.currentTerms.trem.ftkid){
                spcyagainXcjcwttk({ftkid:row.id,id:this.currentTerms.trem.id}).then(res=>{
                    if(res.code == 200){
                        this.$message.success(res.message)
                        this.getQueryQuestions(this.chapterRow)
                        this.termItemVisible = false
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }else{
                spcyaddXcjcwttk({ftkid:row.id,fxcjcwtid:this.currentTerms.item.id,sqsxid:this.currentRow.sqsxid}).then(res=>{
                    if(res.code == 200){
                        this.$message.success(res.message)
                        this.getQueryQuestions(this.chapterRow)
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }
        },
        deleteWTClick(row){//删除问题
            //console.log('删除问题',row)
            let that = this
            this.$confirm({
                title:'您确认删除吗？',
                // icon: createVNode(ExclamationCircleOutlined),
                onOk() {
                    spcydeleteXcjcwt({id:row.wt.id}).then(res=>{
                        if(res.code == 200){
                            that.$message.success(res.message)
                            that.getQueryQuestions(that.chapterRow)
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                }
            })
        },
        //删除条款
        deleteTermItem(row){
            let that = this
            this.$confirm({
                title:'您确认删除吗？',
                // icon: createVNode(ExclamationCircleOutlined),
                onOk() {
                    spcydeleteXcjcwttk({id:row.id}).then(res=>{
                        if(res.code == 200){
                            that.$message.success(res.message)
                            that.getQueryQuestions(that.chapterRow)
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                }
            })
            
        },
        //生成结论
        generateConclusion(name,value){
            spcygenerateXcjcConclusion({sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log('生成结论',res)
                    this.currentRow[name] = res.result.conclusion
                    this.saveData(name,res.result.conclusion)
                    this.$message.success(res.message)
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        //审评报告
        programMemakeChange(row,name){
            spcygetXcjcbgFile({sqsxid:row.sqsxid}).then(res=>{
                //console.log('我再获取审评报告',res)
                this.programData = res.result.length?res.result[0]:{}
                if(res.result.length){
                    if(this.programData.fwjlx == '.pdf'){
                        this.programDataiframeSrc = bootConfig[process.env.NODE_ENV].locality_ApI + YchConstant.SPZX_SPCY + '/spcyRsWjmb/openWjjl?id='+this.programData.id
                    }else{
                        this.openFileClick(this.programData,1)
                    }
                    this.iframeKey = Date.now()
                }else{
                    this.$refs.selectTemplateNoModelRef.getSelectTemplate({},'技术审评报告',row.sqsxid)
                    this.$refs.selectTemplateNoModelRef.selectTemplateVisible = true
                }
                this.programKey = Date.now()
                this.getMaterialSummary()
            })
        },
        defectReportChange(row){
            spcygetXcjcqxbgFile({sqsxid:row.sqsxid}).then(res=>{
                this.defectReportData = res.result.length?res.result[0]:{}
                if(res.result.length){
                    if(this.defectReportData.fwjlx == '.pdf'){
                        this.defectReportDataiframeSrc = bootConfig[process.env.NODE_ENV].locality_ApI + YchConstant.SPZX_SPCY + '/spcyRsWjmb/openWjjl?id='+this.defectReportData.id
                    }else{
                        this.openFileClick(this.defectReportData,2)
                    }
                    this.iframeKey = Date.now()
                }else{
                    this.$refs.selectTemplateNoModel2Ref.getSelectTemplate({},'技术审评缺陷记录表',row.sqsxid)
                    this.$refs.selectTemplateNoModel2Ref.selectTemplateVisible = true
                }
                this.defectReportKey = Date.now()
                this.getMaterialSummary()
            })
        },
        xcjcbjChange(row){
            initWjgetXcjcblFile({sqsxid:row.sqsxid}).then(res=>{
                this.xcjcbjData = res.result.length?res.result[0]:{}
                if(res.result.length){
                    if(this.xcjcbjData.fwjlx == '.pdf'){
                        this.xcjcbjiframeSrc = bootConfig[process.env.NODE_ENV].locality_ApI + YchConstant.SPZX_SPCY + '/spcyRsWjmb/openWjjl?id='+this.xcjcbjData.id
                    }else{
                        this.openFileClick(this.xcjcbjData,3)
                    }
                    this.iframeKey = Date.now()
                }
                // else{
                //     this.$refs.selectTemplateNoModel2Ref.getSelectTemplate({},'技术审评缺陷记录表',row.sqsxid)
                //     this.$refs.selectTemplateNoModel2Ref.selectTemplateVisible = true
                // }
                this.defectReportKey = Date.now()
            })
        },
        
        
        openFileClick(val,num){//打开文件
            webOfficeApiopenFile({id:val.id}).then(res=>{
                if(res.code == 200){
                    if(num == 1){
                        this.programDataiframeSrc = res.result.wordUrl
                    }else if(num == 2){
                        this.defectReportDataiframeSrc = res.result.wordUrl
                    }else if(num == 3){
                        this.xcjcbjiframeSrc = res.result.wordUrl
                    }
                    this.iframeKey = Date.now()
                }else{
                    this.$message.warning(res.message)
                }
            })
        },

        refreshFile(){//刷新
            
            if(this.currentSteps == 1){
                this.xcjcbjChange(this.currentRow)
            }else{
                if(this.activeKey == '审评报告'){
                    this.programMemakeChange(this.currentRow)
                }else if(this.activeKey == '缺陷报告'){
                    this.defectReportChange(this.currentRow)
                }
            }
            
            
        },

        downloadFiles(val){//下载
            var that = this
            var fileName = val.fwjccmc
            let param = { fywflcode:'001002',id:val.id,sqsxid:this.currentRow.sqsxid}
            spcySqsxWjjlgetLocalFileById(param).then((data) => {
                if (!data) {
                    that.$message.warning('文件下载失败')
                return
                }
                    let url = window.URL.createObjectURL(new Blob([data], { type: blobType.type[blobType.suffix.indexOf(val.fwjlx)] }))
                    let link = document.createElement('a')
                    link.style.display = 'none'
                    link.href = url
                    link.setAttribute('download', fileName + val.fwjlx)
                    document.body.appendChild(link)
                    link.click()
                    document.body.removeChild(link) //下载完成移除元素
                    window.URL.revokeObjectURL(url) //释放掉blob对象
            })
        },
        
        reEdit(){//重新编辑
            let data = {
                id:this.currentSteps == 1?this.xcjcbjData.id:this.activeKey == '审评报告'?this.programData.id:(this.activeKey == '缺陷报告'?this.defectReportData.id:'')
            }
            againEditPdfOnlineFile(data).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.refreshFile()
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        saveFiles(){//保存
            let data = {
                id:this.currentSteps == 1?this.xcjcbjData.id:this.activeKey == '审评报告'?this.programData.id:(this.activeKey == '缺陷报告'?this.defectReportData.id:'')
            }
            getWebOfficeDownloadFile(data).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.refreshFile()
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        
        generatePDFClick(){//生成PDF
            let data = {
                id:this.currentSteps == 1?this.xcjcbjData.id:this.activeKey == '审评报告'?this.programData.id:(this.activeKey == '缺陷报告'?this.defectReportData.id:'')
            }
            getDocxToPdf(data).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.refreshFile()
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        
        stampClick(){//盖章
            let data = {
                id:this.activeKey == '审评报告'?this.programData.id:this.defectReportData.id
            }
            pdfFileHcCa(data).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.refreshFile()
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        
        generatePDFStampClick(){//生成PDF并盖章
            let data = {
                id:this.activeKey == '审评报告'?this.programData.id:this.defectReportData.id
            }
            getDocxToPdfAndGz(data).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.refreshFile()
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        
        reSelectTemplate(){//重新选择模板
            this.$refs.selectTemplateRef.getSelectTemplate(
                this.activeKey == '审评报告'?this.programData:this.defectReportData,
                this.activeKey == '审评报告'?'技术审评报告':'技术审评缺陷记录表',
                this.currentRow.sqsxid)
            this.$refs.selectTemplateRef.selectTemplateVisible = true
        },
        //选择模板
        selectTemplateCompleteNoModel(val){
            if(val == '技术审评报告'){
                this.programMemakeChange(this.currentRow)
            
            }else{
                this.defectReportChange(this.currentRow)
            }
        },
        //旧
        getReportTemplateData(val){
            this.reportTemplateLoading = true
            if(val == '审评报告'){
                spcygetJcbgMb({...this.paginationDescribe,sqsxid:this.currentRow.sqsxid,fmbnr:this.reportTemplateSearchText,fmbly:this.reportTemplatefmbl}).then(res=>{
                    if(res.code == 200){
                        if(res.result.records.length){
                            res.result.records.unshift({id:'-1',fzdyznr:'条款内容与审评要点',fzdyzh:'对应条款',})
                        }
                        this.reportTemplateList = res.result.records
                        this.totalDescribe = res.result.total
                    }else{
                        this.$message.warning(res.message)
                    }
                    this.reportTemplateLoading = false
                })
            }else if(val == '缺陷报告'){
                spcygetQxbgMb({...this.paginationDescribe,sqsxid:this.currentRow.sqsxid,fmbnr:this.reportTemplateSearchText,fmbly:this.reportTemplatefmbly}).then(res=>{
                    if(res.code == 200){
                        if(res.result.records.length){
                            res.result.records.unshift({id:'-1',fzdyznr:'条款内容与审评要点',fzdyzh:'对应条款',})
                        }
                        this.reportTemplateList = res.result.records
                        this.totalDescribe = res.result.total
                    }else{
                        this.$message.warning(res.message)
                    }
                    this.reportTemplateLoading = false
                })
            }
        },
        
        reportTemplateRadioChange(){
            this.getReportTemplateData(this.reportName)
        },
        onSearchReportTemplate(val){
            this.reportTemplateSearchText = val
            this.getReportTemplateData(this.reportName)
        },
        //报告模板
        SelectReportTemplate(val){
            this.reportName = val
            this.paginationDescribe.pageNo = 1
            this.paginationDescribe.pageSize = 10
            this.getReportTemplateData(val)
            this.reportTemplateVisible = true
        },
        //存为报告模板
        saveReportTemplate(val,name){
            let data = {sqsxid:this.currentRow.sqsxid}
            data[name] = this.currentRow[name]
            if(this.currentRow[name]){
                if(val == '审评报告'){
                    spcyaddJcbgMb(data).then(res=>{
                        if(res.code == 200){
                            this.$message.success(res.message)
                        }else{
                            this.$message.warning(res.message)
                        }
                    })
                }else if(val == '缺陷报告'){
                    spcyaddQxbgMb(data).then(res=>{
                        if(res.code == 200){
                            this.$message.success(res.message)
                        }else{
                            this.$message.warning(res.message)
                        }
                    })
                }
                
            }else{
                this.$message.warning('请先输入'+val)
            }
        },
        //--------------技术审评材料汇总
        getMaterialSummary(){
            spcyqueryXcjcFileMl({sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log('技术审评材料汇总',res.result)
                    this.materialSummaryList = res.result[0].mcList
                    this.canvasKey = Date.now()
                    this.queryResultsQr = qrcanvas({
                        data: bootConfig[process.env.NODE_ENV].EXTERNAL_ACCESS_URL2+process.env.BASE_URL+`businessManagementSatisfactionSurvey?obj=`+JSON.stringify({sqsxid:this.currentRow.sqsxid})|| "二维码生成中",
                        size:260,
                        background:'#fff'
                    })
                    this.$nextTick(()=>{
                        setTimeout(()=>{
                            //console.log('获取了画布',document.getElementById(this.canvasId))
                            if(document.getElementById(this.canvasId)) {
                                var canvas = document.getElementById(this.canvasId);
                                var context = canvas.getContext('2d');
                                context.font = "22px Arial"
                                context.textAlign = "center"
                                // context.globalCompositeOperation = 'source-in';
                                context.fillStyle = "#000";
                                context.background = '#fff'
                                context.fillText('满意度调查',90,20);
                                var img = new Image();
                                img.onload = function() {
                                    context.drawImage(img, 10, 30,180,170);
                                }
                                img.src = this.queryResultsQr.toDataURL("image/png");
                            }
                        },200)
                        
                    })
                }else{
                    this.$message.warning(res.message)
                }
            })
            spcyqueryWjMlBySchyJc({sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log('审评组材料',res.result)
                    this.firstMeetingInspectionTeamList = res.result
                }else{
                    this.$message.warning(res.message)
                }
            })
            spcyqueryWjMlBySchyQy({sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log('企业材料目录',res.result)
                    this.firstMeetingEnterpriseList = res.result.records
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        editClick(val){
            this.$refs.serverEditingRef.getData(val)
        },
        refreshChange(){
            this.getMaterialSummary()
        },
        //选择模板
        selectTemplateComplete(val){
            this.getMaterialSummary()
        },
        initWjjlServe(val){//生成记录
            commoninitWjjl({sqsxid:this.currentRow.sqsxid,type:val}).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.getMaterialSummary()
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        selectFileCahnge(val){//选择模板
            this.$refs.selectTemplateDownloadRef.getSelectTemplate({selectFileSaveType:'commoninitWjjl'},val,this.currentRow.sqsxid)
            this.$refs.selectTemplateDownloadRef.selectTemplateVisible = true
        },
        //上传
        singleUploadCahnge({file},val){
            var that = this
            if(file.name.indexOf('.pdf') !== -1){
                const fileData = new FormData();
                fileData.append("file",file);
                fileData.append("fywflcode",'001002');
                fileData.append("sqsxid",this.currentRow.sqsxid);
                fileData.append("type",val);
                spcyuploadSqsxFile(fileData).then(res => {
                    if(res.code !== 200){
                        that.$message.warning('请上传pdf文件或者联系管理员!')
                    }else{
                        that.getMaterialSummary(this.currentRow)
                        that.$message.success('上传成功')
                    }
                    
                })
            }else{
                this.$message.warning('请上传pdf文件')
            }
            
        },
        producerUpload({file},val){//
            var that = this
            const fileData = new FormData();
            fileData.append("file",file);
            fileData.append("fywflcode",'001002');
            fileData.append("sqsxid",this.currentRow.sqsxid);
            fileData.append("id",val.id);
            uploadPdfFileById(fileData).then(res => {
                if(res.code !== 200){
                    that.$message.warning('请上传pdf文件或者联系管理员!')
                }else{
                    that.getMaterialSummary(this.currentRow)
                    that.$message.success('上传成功')
                }
                
            })
        },
        //删除
        producerDelete(val){
            var that = this
            this.$confirm({
                title:'您确认要删除吗？',
                // icon: createVNode(ExclamationCircleOutlined),
                onOk() {
                    spcySqsxWjjldeleteFileById({id:val.id}).then(res=>{
                        if(res.code == 200){
                            that.getMaterialSummary()
                            that.$message.success('删除成功')
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                },
                
            });
            
        },
        //查看pdf
        viewClick(val){
            this.$refs.serverEditingViewRef.getData({id:val.id,fwjlx:val.fwjlx})
            this.$refs.serverEditingViewRef.serverEditingVisible = true
        },
        packageDownloadClick(){//打包下载
            var fileName = '企业材料'
            spcydownZipZxclQy({sqsxid:this.currentRow.sqsxid}).then((data) => {
                if (!data) {
                    that.$message.warning('文件下载失败')
                return
                }
                    let url = window.URL.createObjectURL(new Blob([data], { type: blobType.type[blobType.suffix.indexOf('.zip')] }))
                    let link = document.createElement('a')
                    link.style.display = 'none'
                    link.href = url
                    link.setAttribute('download', fileName + '.zip')
                    document.body.appendChild(link)
                    link.click()
                    document.body.removeChild(link) //下载完成移除元素
                    window.URL.revokeObjectURL(url) //释放掉blob对象
            })
        },
        //下载模板
        downloadTemplateCahnge(val){
            var that = this
            var fileName = val+'模板'
            let param = { fywflcode:'001002',type:val,sqsxid:this.currentRow.sqsxid}
            spcydownloadSqsxFileMb(param).then((data) => {
                if (!data) {
                    that.$message.warning('文件下载失败')
                return
                }
                    let url = window.URL.createObjectURL(new Blob([data], { type: blobType.type[blobType.suffix.indexOf('.doc')] }))
                    let link = document.createElement('a')
                    link.style.display = 'none'
                    link.href = url
                    link.setAttribute('download', fileName + '.doc')
                    document.body.appendChild(link)
                    link.click()
                    document.body.removeChild(link) //下载完成移除元素
                    window.URL.revokeObjectURL(url) //释放掉blob对象
            })
        },
        linkClick(){
            var link = document.createElement('a');
            link.target='_blank'
            link.href = bootConfig[process.env.NODE_ENV].EXTERNAL_ACCESS_URL2+process.env.BASE_URL+`businessManagementSatisfactionSurvey?obj=`+JSON.stringify({sqsxid:this.currentRow.sqsxid})|| "二维码生成中",
            link.click();
        },
        downloadCanvasClick(){
            var canvas = document.getElementById(this.canvasId);
            var dataURL = canvas.toDataURL('image/png');
            // 创建一个链接元素
            var link = document.createElement('a');
            link.download = '满意度调查二维码.png'; // 设置图片名称
            link.href = dataURL; // 设置图片链接
            link.click(); // 模拟点击链接，下载图片
        },
        generateFilesClick(){//生成会议签到表
            sqsxYwxxHtmlToFileByXcjchy({sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    this.getMaterialSummary(this.currentRow)
                    this.$message.success(res.message)
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        signatureFormCahnge(val){//下载签字表
            if(val == '技术审评会议签到表'){
                sqsxYwxxdownHtmlToFileByXcjchy({sqsxid:this.currentRow.sqsxid}).then((data)=>{
                    if (!data) {
                        that.$message.warning('文件下载失败')
                        return
                    }
                    let url = window.URL.createObjectURL(new Blob([data], { type: blobType.type[blobType.suffix.indexOf('.docx')] }))
                    let link = document.createElement('a')
                    link.style.display = 'none'
                    link.href = url
                    link.setAttribute('download', val + '.docx')
                    document.body.appendChild(link)
                    link.click()
                    document.body.removeChild(link) //下载完成移除元素
                    window.URL.revokeObjectURL(url) //释放掉blob对象
                })
            }else{
                sqsxYwxxdownHtmlToFileByXcjcjl({sqsxid:this.currentRow.sqsxid}).then((data)=>{
                    //console.log(data)
                    if (!data) {
                        that.$message.warning('文件下载失败')
                        return
                    }
                    let url = window.URL.createObjectURL(new Blob([data], { type: blobType.type[blobType.suffix.indexOf('.docx')] }))
                    let link = document.createElement('a')
                    link.style.display = 'none'
                    link.href = url
                    link.setAttribute('download', val + '.docx')
                    document.body.appendChild(link)
                    link.click()
                    document.body.removeChild(link) //下载完成移除元素
                    window.URL.revokeObjectURL(url) //释放掉blob对象
                })
            }
        },
        downloadFiles(val){//下载
            var that = this
            
            var fileName = val.fwjxsmc?val.fwjxsmc:val.fwjccmc
            let param = { fywflcode:'001002',id:val.id,sqsxid:this.currentRow.sqsxid}
            spcySqsxWjjlgetLocalFileById(param).then((data) => {
                if (!data) {
                    that.$message.warning('文件下载失败')
                return
                }
                    let url = window.URL.createObjectURL(new Blob([data], { type: blobType.type[blobType.suffix.indexOf(val.fwjlx)] }))
                    let link = document.createElement('a')
                    link.style.display = 'none'
                    link.href = url
                    link.setAttribute('download', fileName + val.fwjlx)
                    document.body.appendChild(link)
                    link.click()
                    document.body.removeChild(link) //下载完成移除元素
                    window.URL.revokeObjectURL(url) //释放掉blob对象
            })
        },

        //提交技术审评任务
        submitOnSite(val){
            this.$emit('linkHandling',val)
        },
        //保存
        saveData(name,value,obj){
            let data = {
                jobid:this.currentRow.jobid,
                sqsxid:this.currentRow.sqsxid,
                opinion:'',
                smgflag:'否',
                map:{}
            }
            if(name){
                data.map[name] = value
            } else if(obj){
                data.map = {...obj}
            } else{
                data.map = { ...this.currentRow,}
            }
            spcysaveFlow(data).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                }else{
                    this.$message.warning(res.message)
                }
                this.successChange()
            })
        },
        successChange(val){
            //console.log('到这里了吗？')
            if(val){
                this.refreshTable = Date.now()
            }else{
                this.$emit('reviseClick',{...this.currentRow,isSssignPersonnel:true,noFirstLoad:true})
            }
            
        },
        
    }
}
</script>
<style lang="less">
//1
.on-siteInspection-div-2{
    width: 100%;
    padding: 2px 5px 5px 5px;
    overflow-y: auto;
    // background-color: #fff;
    // .on-siteInspection-tabs{
    //     padding: 0 5px;
    //     background-color: #fff;
    //     position: relative;
    //     // top: 48px;
    //     top: 0;
    //     right: 0;
    //     // margin:0 10px;
    //     font-size: 20px !important;
    //     font-weight: 600 !important;
    //     .ant-tabs-bar{
    //         margin: 0;
    //     }
    //     .ant-tabs-nav .ant-tabs-tab{
    //         padding-top: 5px;
    //         padding-bottom: 5px;
    //         margin-right: 10px;
    //     }
    //     .ant-tabs-nav-container{
    //         height: 50px !important;
    //     }
    //     .ant-tabs-nav-scroll{
    //         padding-top: 10px;
    //         padding-left: 10px;
    //     }
    // }
    // .ant-tabs-tab-active{
    //     font-size: 16px;
    //     font-weight: 600 !important;
    // }
    // .ant-tabs-tab{
    //     font-size: 16px;
    //     font-weight: 600 !important;
    //     line-height: 28px !important;
    //     border-radius: 10px 10px 0 0 !important;
    // }
    // .ant-tabs-tab-active{
    //     background-color: #5ca3e5 !important;
    //     color: #fff !important;
    //     border-color: #5ca3e5 !important;
    //     box-shadow: 0px 0px 12px 0px #5ca3e5;
    // }
    // .on-siteInspection-content{
    //     margin-top: 10px;
    //     height: calc(100vh - 145px);
    //     overflow-y: auto;
    //     box-shadow: 0px 0px 12px 0px #5ca3e5;
    // }
    .ant-steps-item-title{
        font-weight: 600 !important;
        font-size: 18px;
    }
    .on-siteInspection-content{
        overflow-y: auto;
        padding: 10px;
        // margin: 5px;
        background-color: #fff;
        border-top: 0 !important;
    }
    // .nextStep-box{
    //     display: flex;
    //     justify-content: center;
    //     position: absolute;
    //     width: calc(100% - 12px);
    //     bottom: 6px;
    //     left: 6px;
    //     background-color: #fff;
    //     border-top: 1px solid #d9d9d9;
    //     padding: 0px 0;
    // }
    .steps-item-icon-box{
        width: 24px;
        height: 24px;
        border: 1px solid rgba(0, 0, 0, 0.25);
        line-height: 23px;
        border-radius: 50%;
        background-color: #fff;
        text-align: center;
        font-size: 14px;
    }
    .ant-steps-item-active{
        .steps-item-icon-box{
            border: 1px solid #2F54EB;
            background-color: #2F54EB;
            color: #fff;
        }
    }
    .ant-steps-item-finish{
        .steps-item-icon-box{
            color: #2F54EB;
            border: 1px solid #2F54EB;
        }
        
    }
    
}
//2
.on-siteInspection-div-2{
    .review-table{
        th{
            text-align: center;
            padding: 10px;
        }
        td{
            padding: 10px;
        }
    }
    th{
        padding: 10px;
        text-align: center;
    }
    td{
        padding: 5px;
    }
    .file-for-box{
        display: flex;
        flex-wrap: wrap;
        .toolbox-fileList-box{
            // width: 104px;
            height: 98px;
            margin: 10px;
            margin-left: 0;
            display: flex;
            flex-direction: column;
            justify-content: center;
            overflow: hidden;
            border: 1px solid #d9d9d9;
            .fileList-icon-btn{
                flex: 1;
                display: flex;
                justify-content: space-around;
                .toolbox-filePdf-icon-type{
                    font-size: 40px;
                    color: #229dfc;
                    display: inline-block;
                    margin-top: 8px;
                }
                .left-icon-btn,.right-icon-btn{
                    padding: 7px 0;
                    width: 15px;
                    display: flex;
                    flex-direction: column;
                    justify-content: space-between;
                }
                .toolbox-delete-icon-type{
                    color: #ed5565;
                }
                .toolbox-eye-icon-type{
                    color: #1ab394;
                    display: inline-block;
                    margin-top: 8px;
                }
                .toolbox-download-icon-type{
                    color: #229dfc;
                }
                .toolbox-upload-icon-type{
                    color: #229dfc;
                    display: inline-block;
                    margin-top: 8px;
                }
            }
            .toolbox-file-coontern{
                display: flex;
                justify-content: center;
                align-items: center;
                padding: 0 3px;
                height: 42px;
                .toolbox-file-name{
                    
                    flex: 1;
                    text-align: center;
                    display: -webkit-box;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    -webkit-line-clamp: 2; /* 控制最大行数 */
                    -webkit-box-orient: vertical;
                }
            }
        }
    }
    .file-for-v{
        width: 130px;
        height: 130px;
        border-radius: 2px;
        border: 1px solid #d9d9d9;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 5px;
        margin: 5px;
        .file-icon-box{
            display: flex;
            justify-content: space-evenly;
            .file-icon-v{
                font-size: 42px;
                color: rgb(24, 144, 255);
                padding: 7px 0;
            }
            .left-box{
                // width: 28px;
            }
            .right-box{
                display: flex;
                flex-direction: column;
                justify-content: space-between;
                padding-bottom: 2px;
                .eye-icon-v{
                    font-size: 18px;
                    color: rgb(24, 144, 255);
                }
            }
            .fileicon-v{
                font-size: 18px;
                // color: rgb(24, 144, 255);
                color: #2F54EB;
            }
            .deleteicon-v{
                color: #ed5565;
            }
        }
        
        .name-fclmc-text{
            height: 60px;
            text-align: center;
            display:block;
            text-overflow: -o-ellipsis-lastline;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            // display: flex;
            // flex-direction: column;
            // justify-content: center;
            -webkit-line-clamp: 3;
            line-clamp: 3;
            -webkit-box-orient: vertical;
            font-size: 14px;
        }
    }
    .chapter-tabs{
        .ant-tabs-bar{
            border: 0px;
            margin: 0;
        }
        .ant-tabs-nav .ant-tabs-tab{
            margin-right: 10px;
        }
        .ant-tabs-nav-container{
            height: 50px !important;
        }
        .ant-tabs-nav-scroll{
            padding-top: 10px;
            padding-left: 10px;
        }
        .ant-tabs-nav .ant-tabs-tab{
            // padding: 10px;
            line-height: 40px !important;
            border-radius: 10px 10px 0 0 !important;
        }
        
        .ant-tabs-tab-active{
            background-color: #5ca3e5 !important;
            color: #fff !important;
            border-color: #5ca3e5 !important;
            box-shadow: 0px 0px 12px 0px #5ca3e5;
        }
        
        // .on-siteInspection-div .chapter-tabs .ant-tabs-nav .ant-tabs-tab{
        //     padding: 3px 10px;
        // }
        
    }
    .chapter-tabs-content{
        // box-shadow: 0px 0px 12px 0px #5ca3e5 !important;
        // box-shadow: 0px 0px 12px -3px #69a3d9 !important;
        border: 1px solid #38f;
        border-top: none;
        background-color: #fff;
        // margin: 5px;
        padding: 10px;
    }
    
}
.plan-materials-full-modal{
    .ant-modal {
        max-width: 100%;
        top: 0;
        padding-bottom: 0;
        margin: 0;
    }
    .ant-modal-content {
        display: flex;
        flex-direction: column;
        height: calc(100vh);
    }
    .ant-modal-body {
        flex: 1;
        height: calc(100vh - 50px);
        padding:8px;
    }
}
</style>